package adv41;

/**
 * @author oldliu
 * @since 1.0
 */
public class Dizhu {
    public static void main(String[] args) {
        Thread.currentThread().setName("大地主");
        Worker w=new Worker("喜儿");
        w.start();
        while (true){
            try {
                System.out.println("地主睡一会");
                Thread.sleep(2100);
                System.out.println("地主醒了，喊工人干活");
                w.interrupt();//中断他的睡眠
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
